<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>仓库管理</title>
<link rel="stylesheet" th:href="@{/css/goods_trade/goods_trade.css}">
</head>
<body>
	<div id="housePage">
	
		<div>
	    	<el-breadcrumb separator-class="el-icon-arrow-right">
			  <el-breadcrumb-item>仓库管理</el-breadcrumb-item>
			  <el-breadcrumb-item>仓库管理</el-breadcrumb-item>
			</el-breadcrumb>
			<button id="closeButtonForClose" type="text" hidden="hidden"></button>
		</div>
		<br/>

			<div style="margin-left: 88%;">
				      	<!-- 弹窗 --> 
						<el-popover  ref="popover" placement="left" width="600" trigger="click" class="demo-input-suffix">
						 <el-form :inline="false" :model="houseAddForm" label-width="80px"  ref="houseAddForm" label-position="right" size="small" :rules="houseRules">
							<el-form-item label="仓库名称" prop="houseName">
								<el-col :span="15">
		  							<el-input placeholder="请输入仓库名称" v-model="houseAddForm.houseName"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="仓库位置" prop="housePosition">
								<el-col :span="15">
		  							<el-input placeholder="请输入仓库位置" v-model="houseAddForm.housePosition"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="仓库描述" prop="houseDesc">
								<el-col :span="15">
			  						<el-input placeholder="请输入仓库描述" v-model="houseAddForm.houseDesc"></el-input>
			  					</el-col>
							</el-form-item>
							<el-form-item label="仓库级别" prop="houseClass">
								<el-col :span="15">
			  						<el-input placeholder="请输入仓库级别" v-model="houseAddForm.houseClass"></el-input>
			  					</el-col>
							</el-form-item>
		  				</el-form>
		  				<span class="dialog-footer">
							    <el-button size="mini" type="primary" @click="addHouse('houseAddForm')" :loading="addHouseBtn">增加</el-button>
							    <el-button size="mini" type="primary" @click="closePopper('houseAddForm')">取消</el-button>
							</span>
						</el-popover>
				      	<el-button v-popover:popover  type="primary" icon="el-icon-plus" circle>增加仓库</el-button>
			</div>
			<el-tag style="width:100%;">仓库详情表格</el-tag>
		<!--house table start -->
			<template>
			  <el-table
			    :data="houseTable"
			    style="width: 100%">
			    <el-table-column
			      label="仓库名称 "
			      prop="houseName">
			    </el-table-column>
			    <el-table-column
			      label="仓库位置"
			      prop="housePosition">
			    </el-table-column>
			    <el-table-column
			      label="仓库描述"
			      prop="houseDesc">
			    </el-table-column>
			    <el-table-column
			      label="仓库级别"
			      prop="houseClass">
			    </el-table-column>
			    <el-table-column
			      label="创建时间"
			      :formatter="dateFormat"
			      prop="createDate">
			    </el-table-column>
			  </el-table>
			</template>		
			
			<div class="pageContent">		
				<el-pagination
			      @size-change="houseHandleSizeChange"
			      @current-change="houseHandleCurrentChange"
			      :current-page="houseCurrentPage"
			      :page-sizes="[5, 10]"
			      :page-size="housePageSize"
			      layout="total, sizes, prev, pager, next, jumper"
			      :total="housePositionTotalSize">
			    </el-pagination>
			</div>
		<!--house table end -->
				<br/>
		<div style="margin-left: 67%;">
				<el-select v-model="houseSelectForm.id" placeholder="仓库地址" filterable :disabled="disableQuery" @change="selectHouseValue">
				   <el-option v-for="ho in allHouse" :label="ho.houseName" :value="ho.id" :key="ho.id"></el-option>
				</el-select>
				<!-- 弹窗 --> 
						<el-popover  ref="popover2" placement="left" width="600" trigger="click" class="demo-input-suffix">
						 <el-form :inline="false" :model="positionAddForm" label-width="120px"  ref="positionAddForm" label-position="right" size="small" :rules="positionRules">
						 	<el-form-item label="关联仓库名称" prop="houseName">
								<el-col :span="15">
		  							<el-input placeholder="请输入仓库库位名称" v-model="positionAddForm.houseName" :disabled="true"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="仓库库位名称" prop="positionName">
								<el-col :span="15">
		  							<el-input placeholder="请输入仓库库位名称" v-model="positionAddForm.positionName"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="仓库库位位置" prop="positionPoi">
								<el-col :span="15">
		  							<el-input placeholder="请输入仓库库位位置" v-model="positionAddForm.positionPoi"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="仓库库位描述" prop="positionDesc">
								<el-col :span="15">
			  						<el-input placeholder="请输入仓库库位描述" v-model="positionAddForm.positionDesc"></el-input>
			  					</el-col>
							</el-form-item>
							<el-form-item label="仓库库位级别" prop="positionClass">
								<el-col :span="15">
			  						<el-input placeholder="请输入仓库库位级别" v-model="positionAddForm.positionClass"></el-input>
			  					</el-col>
							</el-form-item>
		  				</el-form>
		  				<span class="dialog-footer">
							    <el-button size="mini" type="primary" @click="addPosition('positionAddForm')" :loading="addPositionBtn">增加</el-button>
							    <el-button size="mini" type="primary" @click="closePopper('positionAddForm')">取消</el-button>
							</span>
						</el-popover>
			<el-button v-popover:popover2 type="primary" icon="el-icon-plus" circle @click="">增加库位</el-button>
		</div>
		<el-tag style="width:100%;">库位详情表格</el-tag>
		<!--position table start -->
			<template>
			  <el-table
			    :data="positionTable"
			    style="width: 100%">
			    <el-table-column
			      label="库位名称 "
			      prop="positionName">
			    </el-table-column>
			    <el-table-column
			      label="库位位置"
			      prop="positionPoi">
			    </el-table-column>
			    <el-table-column
			      label="库位描述"
			      prop="positionDesc">
			    </el-table-column>
			    <el-table-column
			      label="库位级别"
			      prop="positionClass">
			    </el-table-column>
			    <el-table-column
			      label="创建时间"
			      :formatter="dateFormat"
			      prop="createDate">
			    </el-table-column>
			  </el-table>
			</template>		
			
			<div class="pageContent">		
				<el-pagination
			      @size-change="positionHandleSizeChange"
			      @current-change="positionHandleCurrentChange"
			      :current-page="positionCurrentPage"
			      :page-sizes="[5, 10]"
			      :page-size="positionPageSize"
			      layout="total, sizes, prev, pager, next, jumper"
			      :total="positionTotalSize">
			    </el-pagination>
			</div>
		<!--position table end -->
		
	</div>
</body>
<script type="text/javascript" th:src="@{js/warehouse/warehouse.js}"></script>
</html>